package com.linkoog.devtools.execute.envfile;

import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;

public class FileReader {

    public static String read(File file) throws IOException {
        if (file == null) {
            throw new IOException("File is required!");
        }

        byte[] bytes = Files.readAllBytes(file.toPath());
        return new String(bytes, StandardCharsets.UTF_8);
    }
}
